<?php if(!defined("PATH_HD"))exit;?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--[if lt IE 7]> <html class="no-js lt-ie10 lt-ie9 lt-ie8 lt-ie7 ie6" lang="en"> <![endif]-->
<!--[if IE 7]>	<html class="no-js  lt-ie10 lt-ie9 lt-ie8 ie7" lang="en"> <![endif]-->
<!--[if IE 8]>	<html class="no-js lt-ie10 lt-ie9 ie8" lang="en"> <![endif]-->
<!--[if IE 9]>	<html class="no-js lt-ie10 ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="es"> <!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link type="text/css" rel="stylesheet" href="http://localhost/zcool/./template/admin/chico/css/chico-min-0.11.1.css"/>
<style type="text/css">
*,body,html{
	margin:0;
	padding:0;
	}
.red{color:red;}
#main{
	width:900px;
	height:600px;
	}
.table1{
	line-height:2em;
	border-collapse:collapse;
	}
.table1 tr{
	border:1px solid #EDEDED
	}
.table1 td{
	text-align:center;
	border-right:1px solid #EDEDED;
	overflow:hidden;
	white-space:nowrap;
	text-overflow:ellipsis;
			
		}
</style>
<script type="text/javascript" src="<?php echo "http://localhost/zcool/./template/admin/chico/js/jquery-1.7.2.min.js";?>"></script>
<script type="text/javascript" src="<?php echo "http://localhost/zcool/./template/admin/chico/js/chico-0.11.1.js";?>"></script>
</head>

<body>
<div class="ch-box-information">这里显示小组信息</div>
<div id="main">
		<div class="YOUR_SELECTOR_TabNavigator ch-tabNavigator ch-tab-vertical">
			<ul class="ch-tabNavigator-triggers" role="tablist">
				<li><a href="#tab1-c" class="ch-tab-trigger ch-tab-trigger-on" role="tab" arial-controls="tab1-c">小组审核</a></li>
				<li><a href="#tab2-c" class="ch-tab-trigger" role="tab" arial-controls="tab2-c">小组管理</a></li>
			</ul>
			<div class="ch-box-lite ch-tabNavigator-content ch-box" role="presentation">
				<div id="tab1-c" role="tabpanel" aria-hidden="false" class="">
					<table class="table1" id="table1" border="1" width="100%">
                    <tr style="font-weight:bold;color:#390">
                    <td>小组ID</td>
                    <td>小组名称</td>
                    <td>审核状态</td>
                    <td>小组说明</td>
                    <td>小组分类</td>
                    </tr>
                    <tr>
                    <?php if(!empty($group)){$listCount = count($group);$list_id1=0;?><?php foreach($group as $key=>$res){?><?php $list_id1+=1;?>
                    <td><?php echo $res['gid'];?></td>
                    <td><?php echo $res['gname'];?></td>
                    <td>
                    <?php
                    if($res['gstate']==0){
                    ?>
                    <a href="javascript:state(<?php echo $res['gid'];?>)" class="state<?php echo $res['gid'];?>">未审核</a>
                    <?php
                    }else{
                    ?>
                    <a href="javascript:state(<?php echo $res['gid'];?>)" class="state<?php echo $res['gid'];?> red">已审核</a>
                    <?php
                    }?>
                    </td>
                    <td><?php echo $res['ginfo'];?></td>
                    <td><?php echo $res['gfenlei1'];?></td>
                    </tr>
                    <?php }?><?php }?>
                    </table>
				</div>
				<div id="tab2-c" class="ch-hide" role="tabpanel" aria-hidden="true">
					tp2
				</div>
			</div>
		</div>
</div>

</body>
<script type="text/javascript">
	var foo = $(".YOUR_SELECTOR_TabNavigator").tabNavigator();
	
	function state(id){ //更改审核状态
	var state = ".state"+id;
		$.ajax({
			type:"GET",
			url:"http://localhost/zcool/index.php/admin/index/groupstate/gid/"+id,
			success: function(data){
				if(data == 1){
					$(state).addClass("red");
					$(state).html("已审核");
					}else{
					$(state).removeClass("red");
					$(state).html("未审核");
						}
				}
			})
		}
	var tb1=document.getElementById("table1");
	var tr1 = tb1.getElementsByTagName("tr");
	
	for(var i=0;i<tr1.length;i++){
		if(i%2==1){
			tr1[i].style.backgroundColor = "#F6F6F6";
			}
		}
</script>
</html>
